package cn.isjinhao.se.sql.grammar.statement.create.represention;

import cn.isjinhao.se.sql.grammar.CurdStatement;
import cn.isjinhao.se.sql.grammar.CurdStatementVisitor;
import cn.isjinhao.se.sql.lexical.token.Token;

import java.util.List;

/**
 * @Author ISJINHAO
 * @Date 2021/7/21 22:43
 */
public class InsertSelectRep extends CurdStatement {

    private List<Token> columnList;
    private CurdStatement select;

    public InsertSelectRep(List<Token> columnList, CurdStatement select) {
        this.columnList = columnList;
        this.select = select;
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitInsertSelectRep(this);
    }

    public List<Token> getColumnList() {
        return columnList;
    }

    public CurdStatement getSelect() {
        return select;
    }
}
